package com.taichuan.keysupport.keyset;

import java.util.List;

/**
 * Created by OISNY on 2016/8/18.
 */
public abstract class KeySet {

    public static final String[] KEYBOARD_1 = {".", "_", "@", "-", "!", "/"};
    public static final String[] KEYBOARD_2 = {"a", "b", "c", "A", "B", "C"};
    public static final String[] KEYBOARD_3 = {"d", "e", "f", "D", "E", "F"};
    public static final String[] KEYBOARD_4 = {"g", "h", "i", "G", "H", "I"};
    public static final String[] KEYBOARD_5 = {"j", "k", "l", "J", "K", "L"};
    public static final String[] KEYBOARD_6 = {"m", "n", "o", "M", "N", "O"};
    public static final String[] KEYBOARD_7 = {"p", "q", "r", "s", "P", "Q", "R",
            "S"};
    public static final String[] KEYBOARD_8 = {"t", "u", "v", "T", "U", "V"};
    public static final String[] KEYBOARD_9 = {"w", "x", "y", "z", "W", "X", "Y",
            "Z"};
    /**
     * 英文选择
     */
    public static final String[][] KEYBOARD_INS = {KEYBOARD_1, KEYBOARD_2, KEYBOARD_3, KEYBOARD_4, KEYBOARD_5,
            KEYBOARD_6, KEYBOARD_7, KEYBOARD_8, KEYBOARD_9};
    /**
     * 英文界面
     */
    public static final String[] KEYBOARD_EN = {"1 ._@", "2 ABC", "3 DEF", "4 GHI",
            "5 JKL", "6 MNO", "7 PQRS", "8 TUV", "9 WXYZ"};
    /**
     * 数字界面
     */
    public static final String[] KEYBOARD_MATH = {"1", "2", "3", "4", "5", "6",
            "7", "8", "9"};
    public static final String[] KEYBOARD_SYMBOL_1 = {",", ".", "?"};
    public static final String[] KEYBOARD_SYMBOL_2 = {"!", ":", "@"};
    public static final String[] KEYBOARD_SYMBOL_3 = {"\\", "'", ";"};
    public static final String[] KEYBOARD_SYMBOL_4 = {"(", ")", "<"};
    public static final String[] KEYBOARD_SYMBOL_5 = {">", "[", "]"};
    public static final String[] KEYBOARD_SYMBOL_6 = {"{", "}", "|"};
    public static final String[] KEYBOARD_SYMBOL_7 = {"_", "-", "#"};
    public static final String[] KEYBOARD_SYMBOL_8 = {"$", "%", "^"};
    public static final String[] KEYBOARD_SYMBOL_9 = {"&", "*", "+"};
    public static final String[] KEYBOARD_SYMBOL_0 = {"=", "~", "`", "\""};
    /**
     * 符号界面
     */
    public static final String[] KEYBOARD_SYMBOL = {"1 ,.?", "2 !:@",
            "3 \\';", "4 ()<", "5 >[]", "6 {}|", "7 _-#", "8 $%^", "9 &*+"};// "0 =~`\""
    /**
     * 符号选择
     */
    public static final String[][] KEYBOARD_SYMBOL_INS = {KEYBOARD_SYMBOL_1,
            KEYBOARD_SYMBOL_2, KEYBOARD_SYMBOL_3, KEYBOARD_SYMBOL_4, KEYBOARD_SYMBOL_5,
            KEYBOARD_SYMBOL_6, KEYBOARD_SYMBOL_7, KEYBOARD_SYMBOL_8, KEYBOARD_SYMBOL_9,
            KEYBOARD_SYMBOL_0};
    OnKeySupportListener mOnKeySupportListener = null;


    public KeySet(OnKeySupportListener listener) {
        mOnKeySupportListener = listener;
    }

    public abstract void performClickX();

    public abstract void performClickZero();

    public abstract void performClickJ();

    public abstract void performKey(int index, boolean isSameKey);

    public abstract void updatePanelView();

    public abstract List<String> getGridViewData();

    public interface OnKeySupportListener {

        void setXDrawable(int drawableId, int xIndex);

        void setXDrawable(int drawableId, boolean xClick);

        void setZeroText(String text, int jIndex);

        void setJDrawable(int drawableId, int jIndex);

        void upGridViewData(List<String> list);

        void updateEdit(String text);

        void onKeyDown(int keyCode);

    }
}
